.class public Lcom/estrongs/android/pop/app/d0;
.super Ljava/lang/Object;
.source "InstallMonitorHandler.java"


# direct methods
.method private static a(Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    const/4 v0, 0x0

    if-nez p0, :cond_0

    return-object v0

    .line 2
    :cond_0
    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v1

    const-string v2, "/mnt/asec"

    .line 3
    invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p0

    if-eqz p0, :cond_2

    .line 4
    invoke-static {}, Lcom/estrongs/android/util/h0;->f()Ljava/util/List;

    move-result-object p0

    .line 5
    invoke-interface {p0, v1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 6
    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_1

    const/4 v0, 0x0

    .line 7
    invoke-interface {p0, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Ljava/lang/String;

    return-object p0

    :cond_1
    return-object v0

    :cond_2
    return-object v1
.end method

.method static synthetic a(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0

    .line 1
    invoke-static {p0, p1}, Lcom/estrongs/android/pop/app/d0;->b(Landroid/content/Context;Ljava/lang/String;)V

    return-void
.end method

.method private static b(Landroid/content/Context;Ljava/lang/String;)V
    .locals 9

    .line 1
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    const/4 v1, 0x0

    .line 2
    invoke-virtual {v0, p1, v1}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p1

    .line 3
    iget-object v0, p1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/d0;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_2

    .line 4
    invoke-static {v0}, Lcom/estrongs/fs/util/f;->h(Ljava/lang/String;)[J

    move-result-object v2

    if-eqz v2, :cond_2

    .line 5
    array-length v3, v2

    const/4 v4, 0x3

    if-ge v3, v4, :cond_0

    goto :goto_1

    .line 6
    :cond_0
    iget-object p1, p1, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    iget p1, p1, Landroid/content/pm/ApplicationInfo;->flags:I

    const/high16 v3, 0x40000

    and-int/2addr p1, v3

    if-eqz p1, :cond_1

    const-string p1, "/mnt/asec"

    invoke-virtual {v0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_1

    const p1, 0x7f110a3c

    .line 7
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    goto :goto_0

    :cond_1
    const p1, 0x7f110a3d

    .line 8
    invoke-virtual {p0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p1

    .line 9
    :goto_0
    aget-wide v3, v2, v1

    const/4 v0, 0x1

    aget-wide v5, v2, v0

    div-long/2addr v3, v5

    const-wide/16 v5, 0x3

    cmp-long v7, v3, v5

    if-ltz v7, :cond_2

    const v3, 0x7f110303

    new-array v4, v0, [Ljava/lang/Object;

    .line 10
    aget-wide v5, v2, v0

    const/4 v0, 0x2

    aget-wide v7, v2, v0

    mul-long v5, v5, v7

    invoke-static {v5, v6}, Lcom/estrongs/fs/util/f;->g(J)Ljava/lang/String;

    move-result-object v0

    aput-object v0, v4, v1

    invoke-virtual {p0, v3, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 11
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " "

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 12
    new-instance v0, Lcom/estrongs/android/pop/app/d0$b;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/pop/app/d0$b;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/estrongs/android/util/o0;->a(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    nop

    :catch_0
    :cond_2
    :goto_1
    return-void
.end method

.method public static c(Landroid/content/Context;Ljava/lang/String;)V
    .locals 3

    const/4 v0, 0x1

    .line 1
    invoke-static {v0}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->m(Z)V

    .line 2
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object v0

    const-string v1, "act6"

    const-string v2, "install"

    .line 3
    invoke-virtual {v0, v1, v2}, Lcom/estrongs/android/statistics/b;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    sget-boolean v0, Lcom/estrongs/android/pop/j;->g0:Z

    if-nez v0, :cond_0

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->i1()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 6
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/estrongs/android/pop/app/d0$a;

    invoke-direct {v1, p0, p1}, Lcom/estrongs/android/pop/app/d0$a;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 7
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    :cond_0
    return-void
.end method
